package 算法练习;/**
 * @author： li
 * @date： 2022-01-11 19:05
 * @version 1.0
 */
import java.util.HashSet;
import java.util.Scanner;
public class p0804_字符串压缩01 {
    static void strcompress(String s){
        int i=0;
        char compare;
        char[]  c=s.toCharArray();
        StringBuilder sb= new StringBuilder();
        StringBuilder sb_c= new StringBuilder();
        StringBuilder sb_d= new StringBuilder();
        StringBuilder sb_f= new StringBuilder();
        StringBuilder sb_g= new StringBuilder();
        HashSet<Character> sites = new HashSet<>();

        sb_c.append(s);
        sb_d.append(s);
        for(int j=1;j<s.length();j++){
            if(sites.add(c[j-1])){
                sb.append(c[j-1]);
            }
        }
//        System.out.println(sb.toString());
        sites.clear();
        for(int k=0;k<sb.length();k++){
            compare=sb.charAt(k);
            if(sb.charAt(k)==' '){
                sb_f.append(" ");
                continue;
            }
            for(int l=0;l<sb_c.length();l++){
                if (sb_c.charAt(l) == compare) {
                    i++;
//                System.out.print("i="+i);
                if (i!=1&&i!=3&&i!=6) {
                    sb_d.replace(l,l+1,"0");
//                    System.out.println(sb_d.toString());
                }
                }
            }
            i=0;
        }
//        System.out.println(sb_d.toString());
//        System.out.println(sb_f.toString());
        for(int q=0;q<sb_d.length();q++){
            if(sb_d.charAt(q)!='0') System.out.print(sb_d.charAt(q));
        }
//        System.out.println(" ");
    }
    public static void main(String[] args) {
        String input;
        Scanner sc =new Scanner(System.in);
        input = sc.nextLine();
//        System.out.println(input);
        strcompress(input);
    }
}
